﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using com.ClickCricket.bll;

public partial class CountryList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<com.ClickCricket.bll.Country> _countryList = CountryService.Instance.getCountry();
        Master.FindControl("ContentPlaceHolder1").Controls.Add(new LiteralControl("<br/>"));
        Master.FindControl("ContentPlaceHolder1").Controls.Add(new LiteralControl("<br/>"));
        Master.FindControl("ContentPlaceHolder1").Controls.Add(new LiteralControl("<u>Country List</u>"));
        Master.FindControl("ContentPlaceHolder1").Controls.Add(new LiteralControl("<br/>"));
        for (int i = 0; i < _countryList.Count; i++)
        {
            LinkButton c = new LinkButton();
            c.Text = _countryList[i].CountryName;
            c.PostBackUrl = "~/Country.aspx?CountryID=" + _countryList[i].CountryId;
            Master.FindControl("ContentPlaceHolder1").Controls.Add(c);            
            Master.FindControl("ContentPlaceHolder1").Controls.Add(new LiteralControl("<br/>"));            

        }
    }
}
